add debian patch numpy_drop_in1d_MR12693.patch
authorDrew Parsons <dparsons@debian.org>
Mon, 25 May 2026 19:08:49 +0000 (21:08 +0200)
committerDrew Parsons <dparsons@debian.org>
Mon, 25 May 2026 19:08:49 +0000 (21:08 +0200)
applies upstream MR#12693 to remove numpy.in1d, no longer provided by
numpy 1.24 (use numpy.isin instead).

Closes: #1137015
debian/changelog
debian/patches/numpy_drop_in1d_MR12693.patch [new file with mode: 0644]
debian/patches/series

index 0f40b35c7fa9ba384fc7234168fb740eb50c9d75..50280fc01424afd4f29f7a0efea31f8ea8e85b01 100644 (file)
@@ -1,3 +1,11 @@
+vtk9 (9.5.2+dfsg4-5) UNRELEASED; urgency=medium
+
+  * debian patch numpy_drop_in1d_MR12693.patch applies upstream
+    MR#12693 to remove numpy.in1d, no longer provided by numpy 1.24
+    (use numpy.isin instead). Closes: #1137015
+
+ -- Drew Parsons <dparsons@debian.org>  Mon, 25 May 2026 21:06:49 +0200
+
 vtk9 (9.5.2+dfsg4-4) unstable; urgency=medium
 
   * Team upload.
diff --git a/debian/patches/numpy_drop_in1d_MR12693.patch b/debian/patches/numpy_drop_in1d_MR12693.patch
new file mode 100644 (file)
index 0000000..d3423ba
--- /dev/null
@@ -0,0 +1,38 @@
+From 0f9b0ce9fad6bc42a1a69076a32b08ad161adc16 Mon Sep 17 00:00:00 2001
+From: Guillaume Gisbert <guillaume.gisbert@kitware.com>
+Date: Mon, 8 Dec 2025 09:06:41 +0100
+Subject: [PATCH 1/2] Remove deleted numpy function in1d
+
+---
+ Wrapping/Python/vtkmodules/numpy_interface/algorithms.py       | 3 ---
+ Wrapping/Python/vtkmodules/numpy_interface/numpy_algorithms.py | 3 ---
+ 2 files changed, 6 deletions(-)
+
+Index: vtk9/Wrapping/Python/vtkmodules/numpy_interface/algorithms.py
+===================================================================
+--- vtk9.orig/Wrapping/Python/vtkmodules/numpy_interface/algorithms.py 2026-05-25 21:03:24.243777846 +0200
++++ vtk9/Wrapping/Python/vtkmodules/numpy_interface/algorithms.py      2026-05-25 21:05:08.618648422 +0200
+@@ -981,8 +981,8 @@
+                 ugrid.GetPointData().AddArray(da)
+     return ugrid
+-in1d = _make_ufunc(numpy.in1d)
+-in1d.__doc__ = "Test whether each element of a 1-D array is also present in a second array."
++isin = _make_ufunc(numpy.isin)
++isin.__doc__ = "Test whether each element of a 1-D array is also present in a second array."
+ isnan = _make_ufunc(numpy.isnan)
+ isnan.__doc__ = "Returns a bool array, true if values is nan."
+Index: vtk9/Common/Core/Testing/Python/TestNumpyInterface.py
+===================================================================
+--- vtk9.orig/Common/Core/Testing/Python/TestNumpyInterface.py 2026-05-25 21:03:24.243777846 +0200
++++ vtk9/Common/Core/Testing/Python/TestNumpyInterface.py      2026-05-25 21:04:07.865986076 +0200
+@@ -119,7 +119,7 @@
+ compare(algs.cos(randomVec) - numpy.cos(npa), 1E-7)
+ assert algs.cos(randomVec).DataSet is randomVec.DataSet
+-assert algs.in1d(elev, [0,1]) == [item in [0, 1] for item in elev]
++assert algs.isin(elev, [0,1]) == [item in [0, 1] for item in elev]
+ # Various numerical ops implemented in VTK
+ g = algs.gradient(elev)
index a1f79c59ed375e6d9b842c49e3b3e460bbf035e6..cba98ffd12c8911d06cca6bce3f6700584ecaf92 100644 (file)
@@ -14,3 +14,4 @@
 findEXPAT_version_fix_MR12826.patch
 matplotlib_nullptr_s390x.patch
 gdal-3.13.patch
+numpy_drop_in1d_MR12693.patch